package com.dstz.demo.rest.controller;

import com.dstz.base.api.response.impl.ResultMsg;
import com.dstz.base.rest.BaseController;
import com.dstz.demo.core.manager.StationlineinfoManager;
import com.dstz.demo.core.model.Stationlineinfo;
import com.dstz.demo.core.model.StationlineinfoStationinfoVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


/**
 * 全部站点线路关联信息 控制器类<br/>
 * @author  aschs
 * </pre>
 */
@RestController
@RequestMapping("/sys/stationlineinfo")
public class StationlineinfoController extends BaseController<Stationlineinfo>{
	@Resource
	StationlineinfoManager stationlineinfoManager;
	
	
	@Override
	protected String getModelDesc() {
		return "全部站点线路关联信息";
	}

	/**
	 * 查询所有线路列表
	 * @return
	 */

	@GetMapping("/getAll")
	public ResultMsg<List<Stationlineinfo>> getAlls(){

		return ResultMsg.SUCCESS(stationlineinfoManager.all());
	}

	@GetMapping("/getLineNoAll/{lineNo}")
	public ResultMsg<List<StationlineinfoStationinfoVO>> getLineNoAll(@PathVariable("lineNo")String lineNos){

		List<StationlineinfoStationinfoVO> data=stationlineinfoManager.LinenoAll(lineNos);

		return new ResultMsg<>(data);
	}

}
